package oop.day01.exercise;

public class CarTest
{
    public static void main(String[] args)
    {
        Car car = new Car();
        car.brand = "凯迪拉克";
        car.color = "black";
        car.capacity = 5;
        car.price = 19.99;
        car.start();;
        car.run();
        car.stop();

    }
}



class Car
{
    String brand;
    String color;
    double price;
    int capacity;
    Car()
    {};
    void start()
    {
        System.out.println(brand + "牌子的"+ color + "色的"+price+"w的"+capacity+"座的车启动了");
    }

    void run()
    {

        System.out.println(brand + "牌子的"+ color + "色的"+price+"w的"+capacity+"座的车跑了了");
    }

    void stop()
    {

        System.out.println(brand + "牌子的"+ color + "色的"+price+"w的"+capacity+"座的车停止了");
    }
}

